package pers.kw.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * desc: 分页查询参数
 **/
@ApiModel(description = "分页查询父类")
public class PageQueryDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "pageNum不能为空")
    @ApiModelProperty(value = "第几页", allowableValues = "range[1, +∞]", required = true, example = "1")
    private Integer pageNum;

    @NotNull(message = "pageSize不能为空")
    @ApiModelProperty(value = "每页大小", allowableValues = "range[1, +∞]", required = true, example = "10")
    private Integer pageSize;
    @ApiModelProperty(value = "搜索内容", required = false, example = "")
    private String searchValue;
    @ApiModelProperty(value = "通过哪个字段排序", required = false, example = "")
    private String orderBy;
    @ApiModelProperty(value = "是否倒序", required = false, example = "true")
    private Boolean desc;

    public PageQueryDto() {
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getSearchValue() {
        return searchValue;
    }

    public void setSearchValue(String searchValue) {
        this.searchValue = searchValue;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public Boolean getDesc() {
        return desc;
    }

    public void setDesc(Boolean desc) {
        this.desc = desc;
    }
}
